package com.example.administrator.xiaoxiang.activity;

import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.example.administrator.xiaoxiang.R;

public class SafetyActivity extends AppCompatActivity {
//实名注册页面

    private Dialog dialog;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_safety);
        dialog = new Dialog(this);
    }
    public void onClick(View v){
        switch (v.getId()) {
            case R.id.black_img_btn:
                blackDialog();
            break;
        }
    }

    public void blackDialog(){

        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setMessage("确定要退出实名注册流程?");
        builder.setPositiveButton("确定",
                new android.content.DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss();
                        finish();
                    }
                });
        builder.setNegativeButton("取消",
                new android.content.DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss();
                    }
                });
        builder.create().show();

    }
}
